﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _40_C_中两种常用实现单例模式的方式
{
    internal class Singleton1
    {
        private static Singleton1 instance=new Singleton1();

        public static Singleton1 Instance { get { return instance; } }

        private Singleton1() { Name = "张三"; }

        public string Name { get; set; }

        public void show() { Console.WriteLine("第一种单例方法"); }
    }
}
